<?php
/**
 * 注册类
 * @author sunhaoqiang(shqdev@163.com)
 * @time: 2019-08-25 16:38
*/
namespace script;

use script\RouteAnalysis;
class Register
{
    protected static $route = [];
    public static function set($key, $obj)
    {
        self::$route[$key] = $obj;
    }

    public static function get($key)
    {
        return self::$route[$key];
    }

    public static function array()
    {
        return self::$route;
    }

    public static function exists($key)
    {
        return key_exists($key, self::$route);
    }

    public static function merge(Array $array)
    {
        self::$route = array_merge(self::$route, $array);
    }

    public static function del($key)
    {
        unset(self::$route[$key]);
    }

}